import request from '@/utils/request'

export default{
    //分页查询课程列表
    getCourseListPage(current, limit,courseQuery) {
        return request({
            url: `/eduservice/course/pageCourseCondition/${current}/${limit}`,
            method: 'post', 
            data:courseQuery
        })
    },
    //添加课程信息
     addCourseInfo(courseInfo) {
        return request({
            url: `/eduservice/course/addCourseInfo`,
            method: 'post',
            data:courseInfo
        })
    },
    //查询所有的讲师
    getAllTeacher(){
        return request({
            url: `/eduservice/teacher/queryAll`,
            method: 'get'
        })
    },
    //根据id查询课程信息
    getCourseInfoById(courseId) {
        return request({
            url: `/eduservice/course/getCourseInfo/${courseId}`,
            method: 'get'
        })
    },
    //添加课程信息
    updateCourseInfo(courseInfo) {
        return request({
            url: `/eduservice/course/updateCourseInfo`,
            method: 'post',
            data:courseInfo
        })
    },

    //查询课程发布信息
    getCoursePublishInfo(courseId) {
        return request({
            url: `/eduservice/course/getPublishInfo/${courseId}`,
            method: 'get'
        })
    },

    //课程最终发布
    publishCourse(courseId){
        return request({
            url: `/eduservice/course/publishCourse/${courseId}`,
            method: 'post'
        })
    },
    //删除课程
    removeCourse(courseId){
        return request({
            url: `/eduservice/course/deleteCourse/${courseId}`,
            method: 'delete'
        })
    }
}    